package com.njitzx.fileupload.service.impl;

import com.njitzx.fileupload.mapper.UserMapper;
import com.njitzx.fileupload.pojo.User;
import com.njitzx.fileupload.service.UserService;
import com.njitzx.fileupload.util.MD5Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public void createUser(User user) {
        String password = user.getPassword();
        String stringMD5 = MD5Util.getStringMD5(password);
        user.setPassword(stringMD5);
        userMapper.createUser(user);
    }
}
